<?php

namespace app;
class Model extends \think\Model
{
    function getIdAttr()
    {
        return $this->getData($this->getPk());
    }

    /**
     * @return \think\db\Query
     */
    static function getQuery()
    {
        return app(static::class)->db();
    }
}